using Backoffice.Application.Common.Interfaces;
using Backoffice.Application.Common.Services;
using Backoffice.Application.Services;
using BackOffice.Application.Services;
using Microsoft.Extensions.DependencyInjection;

namespace BackOffice.Application;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddApplication(this IServiceCollection services)
    {
        services.AddScoped<AuthService>();
        // 注册应用服务
        services.AddScoped<IRoleService, RoleService>();
        services.AddScoped<IMenuService, MenuService>();
        services.AddScoped<IPermissionService, PermissionService>();
        services.AddScoped<ICurrentUser, CurrentUser>();
        services.AddScoped<IArticleService, ArticleService>();
        services.AddScoped<IFileService, FileService>();
        services.AddScoped<ILogService, LogService>();
        services.AddScoped<UserService>();
        return services;
    }
}